﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using L = Science.Mathematics.LinearAlgebra;

namespace Strang3Ed.Chapter02.Section4
{
    public class Example01
    {
        public Example01()
		{
		}
		private string result;
		public string Result
		{
			get{return result;}
		}
        public void Compute()
        {
            double[,] x = {{1.0,1.0},
                           {2.0,-1.0}};

            L.Matrix A = new L.Matrix(x);

            double[,] y = {{2.0,2.0},
                           {3.0,4.0}};

            L.Matrix B = new L.Matrix(y);

            L.Matrix AB = A * B;

            result += AB[0, 0].ToString() + "    ";
            result += AB[0, 1].ToString() + "\r\n";

            result += AB[1, 0].ToString() + "    ";
            result += AB[1, 1].ToString() + "\r\n";
        }
    }
}
/*
5    6
1    0
*/